package com.itrustsolution.rms.entities;
// Generated 25 Mei 11 22:19:57 by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * RmsGroup generated by hbm2java
 */
@Entity
@Table(name="rms_group"
    ,catalog="rms"
)
public class RmsGroup  implements java.io.Serializable {


     private Integer groupId;
     private String groupName;
     private boolean groupIsactive;
     private Set<RmsGroupModuleFunc> rmsGroupModuleFuncs = new HashSet(0);
     private Set<RmsUser> rmsUsers = new HashSet(0);

    public RmsGroup() {
    }

	
    public RmsGroup(String groupName, boolean groupIsactive) {
        this.groupName = groupName;
        this.groupIsactive = groupIsactive;
    }
    public RmsGroup(String groupName, boolean groupIsactive, Set rmsGroupModuleFuncs, Set rmsUsers) {
       this.groupName = groupName;
       this.groupIsactive = groupIsactive;
       this.rmsGroupModuleFuncs = rmsGroupModuleFuncs;
       this.rmsUsers = rmsUsers;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="GROUP_ID", unique=true, nullable=false)
    public Integer getGroupId() {
        return this.groupId;
    }
    
    public void setGroupId(Integer groupId) {
        this.groupId = groupId;
    }
    
    @Column(name="GROUP_NAME", nullable=false, length=50)
    public String getGroupName() {
        return this.groupName;
    }
    
    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }
    
    @Column(name="GROUP_ISACTIVE", nullable=false)
    public boolean isGroupIsactive() {
        return this.groupIsactive;
    }
    
    public void setGroupIsactive(boolean groupIsactive) {
        this.groupIsactive = groupIsactive;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="rmsGroup")
    public Set<RmsGroupModuleFunc> getRmsGroupModuleFuncs() {
        return this.rmsGroupModuleFuncs;
    }
    
    public void setRmsGroupModuleFuncs(Set<RmsGroupModuleFunc> rmsGroupModuleFuncs) {
        this.rmsGroupModuleFuncs = rmsGroupModuleFuncs;
    }
@ManyToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="rmsGroups")
    public Set<RmsUser> getRmsUsers() {
        return this.rmsUsers;
    }
    
    public void setRmsUsers(Set<RmsUser> rmsUsers) {
        this.rmsUsers = rmsUsers;
    }




}


